package com.kalaqia.base.ui.list;

import android.support.annotation.IntDef;
import android.view.View;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

public interface IStateUtils<T extends View> {

    int STATE_HIDE = -1;
    int STATE_EMPTY = 0;
    int STATE_PROGRESS = 1;
    int STATE_SERVER_ERROR = 2;
    int STATE_NETWORK_ERROR = 3;

    @IntDef({STATE_EMPTY, STATE_HIDE, STATE_PROGRESS, STATE_SERVER_ERROR, STATE_NETWORK_ERROR})
    @Retention(RetentionPolicy.SOURCE)
    @interface StateType {
    }

    void showNoData();

    void showNetworkError();

    void showLoadError(String msg);

    @StateType
    int getCurStateType();

    T build();

}
